import 'package:eh_mobile/common/style/bny_color.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class SetUpCommonUtils {
  static TextStyle leftTextStyle =
      TextStyle(color: Colors.white, fontSize: 18.sp);
  static TextStyle rightTextStyle =
      TextStyle(color: BnyColor.lightAlpha222WhiteColor, fontSize: 14.sp);

  static Widget lineGrayView({EdgeInsetsGeometry? margin}) {
    return Container(
      margin: margin ?? EdgeInsets.only(left: 19.r, right: 19.r),
      height: 1,
      color: const Color.fromRGBO(255, 255, 255, 0.05),
    );
  }

  //带背景切图
  static Widget helpManageView(
      {required Widget childWidget, EdgeInsetsGeometry? padding}) {
    return Container(
      margin: EdgeInsets.only(left: 12.w, right: 12.w),
      padding: padding,
      decoration: BoxDecoration(
          color: const Color.fromRGBO(255, 255, 255, 0.1),
          borderRadius: BorderRadius.circular(15).r),
      child: childWidget,
    );
  }

  static Widget bottomCornerView(String name,{EdgeInsetsGeometry?margin,Color?textColor}) {
    return Container(
      decoration: BoxDecoration(
          color:BnyColor.lightAlpha255WhiteColor,
          borderRadius: BorderRadius.circular(15.r)),
      margin:margin?? EdgeInsets.only(
          bottom: ScreenUtil().bottomBarHeight + 20.h, left: 12.w, right: 12.w),
      padding: EdgeInsets.symmetric(horizontal: 146.w, vertical: 18.h),
      child: Text(
        name,
        style: TextStyle(
          fontSize: 18.sp,
          color:textColor?? const Color.fromRGBO(250, 109, 90, 1.0),
        ),
      ),
    );
  }
}
